/**
 * 获取详情
 * @param id 
 * @returns 
 */
export const getProjectDetail = (id: string): Promise<any> => {
  return useDefaultRequest.get<any>('/list-detail/getById/' + id)
}

export const getDetailByLinkName = (linkName: string): Promise<any> => {
  return useDefaultRequest.get<any>('/list-detail/getDetailByLinkName/' + linkName)
}

export const getCategorys = (moduleId: string): Promise<any> => {
  return useDefaultRequest.get<any>('/webmenus/modelId/' + moduleId)
}

/**
 * 获取某个分类下的数据。可分页
 * @param body 
 * @returns 
 */
export const getListDetailAll = (body: any): Promise<any> => {
  return useDefaultRequest.post<any>('/list-detail/findPublished', body)
}

/**
 * 获取模型详情
 */
export const getModelDetailById = (modelId: string): Promise<any> => {
  return useDefaultRequest.get<any>('/list-detail/getByModelId/' + modelId)
}

/**
 * 根据福彩但编码获取子菜单列表
 */
export const getSubMenuListByCode = (code: string): Promise<any> => {
  return useDefaultRequest.get<any>('/webmenus/parenttree/' + code)
}

/**
 * 获取推荐
 */

export const getRecommends = (): Promise<any> => {
  return useDefaultRequest.get<any>('/list-detail/recommend/list')
}

/**
 * 根据code获取菜单详情
 */

export const getMenuDetailByCode = (code: string): Promise<any> => {
  return useDefaultRequest.get<any>('/webmenus/code/' + code)
}

export const doConsult = (body: any): Promise<any> => {
  return useDefaultRequest.post<any>('/attempt-customer/create', body)
}

export const getCarouselList = (): Promise<any> => {
  return useDefaultRequest.get<any>('/carousel')
}

export const getIndexData = () => {
  return useDefaultRequest.get<any>('/webbase/getIndexData')
}